<ion-view view-title="{{chat.name}}">
  <ion-content class="padding" ng-controller="findPageCtrl">
    <div ng-show="show.formShow">
      <button class="button button-block button-royal" ng-click="showQuery()">条件查询</button>
    </div>
    <div ng-show="show.formShow">
      <button class="button button-block button-assertive" ng-click="delCost()">删除操作</button>
    </div>
    <div class="item item-divider" ng-show="show.total">
      数据汇总：
    </div>
    <div class="item" ng-show="show.total">
      <h6>查询课程总数为{{num}}节,合计{{count}}元</h6>
    </div>
    <div ng-show="show.formHide">
      <div class="item item-input item-select">
        <div class="input-label">
          学生姓名
        </div>
        <select id="stus">
          <option selected id="allStus">全部学生</option>
          <option ng-repeat="s in students" id="{{s.id}}">{{s.name}}</option>
        </select>
      </div>
      <div class="list">
        <div class="item item-input item-select">
          <div class="input-label">
            课程
          </div>
          <select id="lesson">
            <option selected id="allLesson">全部课程</option>
            <option ng-repeat="l in lessons" id="{{l.id}}">{{l.name}}</option>
          </select>
        </div>
      </div>
      <label class="item item-input">
        开始日期
        <input id="startDate" type="date" name="startDate" style="text-align: right">
      </label>
      <label class="item item-input">
        结束日期
        <input id="endDate" type="date" name="endDate" style="text-align: right">
      </label>
      <div class="padding">
        <button id="findLessons" class="button button-block button-royal" ng-click="findByQuery()">查 询</button>
      </div>
    </div>
    <div ng-show="show.tableShow">
      <ion-list ng-repeat="x in costs">
        <ion-item on-double-tap="onDoubleTap(x.id)" ng-show="del.hide">
          <div class="item item-divider">
            {{x.date}}
            <button>双击删除</button>
          </div>
          <div class="item">
            <span>{{x.student}}</span>
            <span ng-if="x.flag">(缺课)</span>
            <h6>{{x.lesson}}&nbsp;&nbsp;{{x.pay}}元</h6>
          </div>
        </ion-item>
        <div class="item item-divider" ng-show="del.show">
          {{x.date}}
        </div>
        <div class="item" ng-show="del.show">
          <span>{{x.student}}</span>
          <span ng-if="x.flag">(缺课)</span>
          <h6>{{x.lesson}}&nbsp;&nbsp;{{x.pay}}元</h6>
        </div>
      </ion-list>
    </div>
  </ion-content>
</ion-view>
